package chapter.second.item5;

import java.util.Calendar;
import java.util.Date;
import java.util.TimeZone;

import org.perf4j.StopWatch;

public class Person {
	
	private final Date birthDate = new Date();
	private static final Date START;
	private static final Date END;
	
	//婴儿潮的开始和结束时间
	static{
		Calendar gmt = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
		gmt.set(1946, Calendar.JANUARY, 1, 0, 0);
		START = gmt.getTime();
		gmt.set(1965, Calendar.JANUARY,1,0,0);
		END = gmt.getTime();
		
	}
	
	//
	public boolean isBabyBoomer(){
		return birthDate.after(birthDate)&&birthDate.before(birthDate);
	}
	
	public static void main(String[] args) {
		StopWatch stopWatch = new StopWatch();
		stopWatch.start();
		Long sum = 0L;
		for(long i=0;i<Integer.MAX_VALUE;i++){
			sum+=i;
		}
		System.out.println(sum);
		stopWatch.stop();
		System.out.println("消耗时间："+(stopWatch.getElapsedTime())+"ms");
	}
}
